﻿using UnityEngine;
using System.Collections;

public class gouzi : GameBehaviour
{
	public Transform Nullgameobj;

	// Use this for initialization
	void Start () 
	{
	   
	}
	void OnTriggerEnter2D (Collider2D other)
	{
		if (other.gameObject.name == "game_bg") 
		{
			Game.instance.GameState=state.SHOUHUI;
		}
		if (other.GetComponent<kuangjin> () != null||other.GetComponent<Mjinkuang>()!=null||other.GetComponent<Sjinkuang>()!=null||other.GetComponent<rock>()!=null||other.GetComponent<zuanshi>()!=null||other.GetComponent<Mouse>()!=null)
		{
			Game.instance.GameState=state.SHOUHUI;
		}
	}
	// Update is called once per frame
	public override void GameUpdate() 
	{
		this.transform.position = Nullgameobj.position;     
	}
}
